<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<xi:include href="master.html" />

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>News | Yale Club Beijing</title>
    <script type="text/javascript">
    //<![CDATA[
    
    //]]>
    </script>
    <style type="text/css">
    .newstitle{
    	font-size: 20px;
    	margin: 20px 0px;
    }
    .newsinfo{
    	text-align: right;
    }
    .newssummary, .newscontent{
    	padding: 10px;
    }
    .newssummary{
    	margin: 10px 0;
    	display: none;
    }
    .news{
    	border-bottom: solid 1px #ccc;
    }
    </style>
</head>
<body>
<div py:if="news" class="news">
    <h1 class="newstitle" py:content="news.title"></h1>
    <div class="newsinfo">${news.created} by ${news.author.name if news.author else "anonymous"}</div>
    <div class="newssummary" py:content="news.summary"></div>
    <div class="newscontent" py:content="HTML(news.content)"></div>
</div>
<div py:if="not news" py:for="n in allnews" class="news">
    <h1 class="newstitle" py:content="n.title"></h1>
    <div class="newsinfo">${n.created} by ${n.author.name if n.author else "anonymous"}</div>
    <div class="newssummary" py:content="n.summary"></div>
    <div class="newscontent" py:content="HTML(n.content)"></div>
</div>
<div py:if="not news and not allnews">No news found.</div>
<p class="paginate" py:if="len(tg.paginate.pages) > 1">
	<b py:for="page in tg.paginate.pages">
        <a py:strip="page == tg.paginate.current_page" href="${tg.paginate.get_href(page)}" py:content="page"/>
    </b>
</p>
</body>
</html>
